export default{
	state:{
		tabList:['绿茶','红茶','黄茶','乌龙茶','白茶','黑茶'],
		GreenList:[],
		RedList:[],
		YelList:[],
		WulongList:[],
		WhiteList:[],
		BlackList:[],
		typecode:1
	},
	getters:{
		getGreenList(){
			console.log('tabList清单')
			uni.request({
				url:'http://172.20.10.2:3000/api/Leaflist',
				data:1,
				success:res=>{
					console.log(res)
					if(res.statusCode!=200){
						return uni.showToast({
							title:'获取数据失败'
						})
					}
					state.GreenList=res.data.list
					console.log(res.data.list)
					
				}
			})
		},
		getRedList(){
			console.log('tabList清单')
			uni.request({
				url:'http://172.20.10.2:3000/api/Leaflist',
				data:2,
				success:res=>{
					console.log(res)
					if(res.statusCode!=200){
						return uni.showToast({
							title:'获取数据失败'
						})
					}
					state.RedList=res.data.list
					console.log(res.data.list)
					
				}
			})
		},
		getYelList(){
			console.log('tabList清单')
			uni.request({
				url:'http://172.20.10.2:3000/api/Leaflist',
				data:3,
				success:res=>{
					console.log(res)
					if(res.statusCode!=200){
						return uni.showToast({
							title:'获取数据失败'
						})
					}
					state.YelList=res.data.list
					console.log(res.data.list)
					
				}
			})
		},
		getWulongList(){
			console.log('tabList清单')
			uni.request({
				url:'http://172.20.10.2:3000/api/Leaflist',
				data:4,
				success:res=>{
					console.log(res)
					if(res.statusCode!=200){
						return uni.showToast({
							title:'获取数据失败'
						})
					}
					state.WulongList=res.data.list
					console.log(res.data.list)
					
				}
			})
		},
		getWhiteList(){
			console.log('tabList清单')
			uni.request({
				url:'http://172.20.10.2:3000/api/Leaflist',
				data:5,
				success:res=>{
					console.log(res)
					if(res.statusCode!=200){
						return uni.showToast({
							title:'获取数据失败'
						})
					}
					state.WhiteList=res.data.list
					console.log(res.data.list)
					
				}
			})
		},
		getBlackList(){
			console.log('tabList清单')
			uni.request({
				url:'http://172.20.10.2:3000/api/Leaflist',
				data:6,
				success:res=>{
					console.log(res)
					if(res.statusCode!=200){
						return uni.showToast({
							title:'获取数据失败'
						})
					}
					state.BlackList=res.data.list
					console.log(res.data.list)
					
				}
			})
		}
	},
	mutations:{
		
	},
	actions:{
		
	}
}